import {Pipe, PipeTransform} from '@angular/core';
import moment from "moment";

@Pipe({
    name: 'unixRsolvedPipe',
})
export class UnixResolvePipe implements PipeTransform {
    transform(time, format = 'YYYY/MM/DD') {
        if (time) {
            return moment.unix(time).format(format)
        } else {
            return '';
        }
    }
}
